package vivace.view;

import javax.swing.JSlider;

import lib.Texter.CText;
import lib.Texter.Text;

public class VSlider extends JSlider implements CText {

	private String toolTipKey;
	
	/**
	 * Vslider is the slider used in appBar
	 * @param orientation	the orientation of the slider (vertical/horisontal)
	 * @param min			minimum value on the slider
	 * @param max			maximum value on the slider
	 * @param value			the init value of the slider
	 * @param toolTipKey	used to set the language on the tooltip with help of CHAMP
	 */
	public VSlider(int orientation, int min, int max, int value, String toolTipKey ){
		super(orientation, min, max, value);
		lib.Texter.Text.registrera(this);
		this.toolTipKey = toolTipKey;
		setToolTipText(Text.getText( toolTipKey ));
	}
	
	public void setCFont() {
		
	}

	public void setToolTipKey( String toolTipKey ){
		this.toolTipKey = toolTipKey;
		setToolTipText(Text.getText( toolTipKey ));
	}

	public void setCText() {
		setToolTipText(Text.getText( toolTipKey ));
	}

}